<%--
  Created by IntelliJ IDEA.
  User: 钟
  Date: 2017/3/14
  Time: 10:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <link rel="stylesheet" type="text/css" href="${path}/css/public.css" />
    <link rel="stylesheet"
          href="${path}/css/themes/base/jquery.ui.all.css">
    <link rel="stylesheet" href="${path}/js/demos.css">

    <script type="text/javascript"
            src="${path}/js/jquery-1.7.2.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.core.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.widget.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.position.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.autocomplete.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.datepicker.js"></script>
    <script type="text/javascript"
            src="${path}/js/jquery.ui.datepicker-zh-CN.js"></script>
    <script src="${path}/js/jquery.ui.button.js"></script>
    <link rel="stylesheet" href="${path}/css/icons.css">
    <script src="${path}/js/icons.js"></script>


    <title>i18n.title.system.announcement
    </title>
</head>
<body>
<!--头部-->
<div class="header">




    <div class="top">
        <div class="top_left">
            <span class="f1">欢迎您：ADMIN</span>
        </div>
        <div class="top_right">
            <a href="${path}/index" class="top_ico0">首页</a>
            <a href="${path}/initUpdatePassword.action" class="top_ico1">修改密码</a>
            <a href="${path}/user/initPersonalInfo.action" class="top_ico2">个人信息</a>
            <a href="${path}/logout.action" class="top_ico3">退出</a>
        </div>
    </div>
    <div class="top2">
        <p class="pro_id">客户关系管理系统 v2.0</p>
    </div>
</div>

<!--主体-->
<table class="main" border="0"
       style="width: 100%; background-color: #FFFFFF">
    <tr>
        <td width="140" style="vertical-align: top;">
            <div class="main_left">



                <script type="text/javascript" src="${path}/js/jquery.ui.accordion.js"></script>

                <script type="text/javascript">
                    $().ready(function() {
                        $('.menuTitle').click(function() {//添加menuTitle的click事件
                            if ($(this).next().is(":hidden")) {//隐藏判断
                                $('.menu_ul_div').slideUp();//隐藏 */
                                $(this).next().slideDown();//显示
                            } else {
                                if ($(this).next().attr("id") == 'menu_ul_div_1') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_2').slideDown();//显示

                                }
                                ;
                                if ($(this).next().attr("id") == 'menu_ul_div_2') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_3').slideDown();//显示

                                }
                                ;
                                if ($(this).next().attr("id") == 'menu_ul_div_3') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_4').slideDown();//显示

                                }
                                if ($(this).next().attr("id") == 'menu_ul_div_4') {

                                    $('.menu_ul_div').slideUp();//隐藏 */
                                    $('#menu_ul_div_1').slideDown();//显示

                                }
                            }
                        });
                    });
                </script>
                <div class="sidebar">

                    <h2 id="menu1" class="menuTitle">客户管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_1"

                         style="display:none;">
                        <ul id="menu1_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/customer/initConflict.action">客户冲突</a></li>
                            <li class="menuItem"><a href="${path}/customer/initAdd.action">添加客户</a></li>
                            <li class="menuItem"><a href="${path}/customer/initServe.action">服务中签约客户</a></li>
                            <li class="menuItem"><a href="${path}/customer/initNoServe.action">未签约客户</a></li>
                            <li class="menuItem"><a href="${path}/customer/initNoServeFirst.action">未签约-已初试</a></li>
                            <li class="menuItem"><a href="${path}/customer/initNoServeSecond.action">未签约-已复试</a></li>
                            <li class="menuItem"><a href="${path}/customer/getAllSea.action">公海客户</a></li>
                            <li class="menuItem"><a href="${path}/visitRecord/initSearch.action">拜访查询</a></li>
                        </ul>
                    </div>


                    <h2 id="menu2" class="menuTitle">合同管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_2"

                         style="display:none;">
                        <ul id="menu2_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/contractTemplate/initList.action">合同模版</a></li>
                            <li class="menuItem"><a href="${path}/contract/initAdd.action">新增合同</a></li>
                            <li class="menuItem"><a href="${path}/contract/initContractValid.action">有效合同查询</a></li>
                            <li class="menuItem"><a href="${path}/contract/initContractInvalid.action">无效合同查询</a></li>
                            <li class="menuItem"><a href="${path}/contract/initPaymentReceivable.action">应收款查询</a></li>
                            <li class="menuItem"><a href="${path}/contract/initPaymentReceived.action">到款查询</a></li>
                        </ul>
                    </div>


                    <h2 id="menu3" class="menuTitle">报表管理</h2>
                    <div class="menu_ul_div" id="menu_ul_div_3"

                         style="display:none;">
                        <ul id="menu3_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/report/initReport.action">拜访量报表</a></li>
                        </ul>
                    </div>


                    <h2 id="menu4" class="menuTitle">系统设置</h2>
                    <div class="menu_ul_div" id="menu_ul_div_4"
                         style="display:block;"
                    >
                        <ul id="menu4_ul" class="menu_ul">
                            <li class="menuItem"><a href="${path}/system/search.action">员工设置</a></li>
                            <li class="menuItem"><a href="${path}/announcement/search.action">公告管理</a></li>
                            <li class="menuItem"><a href="${path}/system/elses.action">其他设置</a></li>
                        </ul>
                    </div>

                </div>
            </div>
        </td>
        <td style="vertical-align: top;">
            <div class="main_right">


                <link rel="stylesheet" type="text/css" href="${path}/css/index.css" />
                <link rel="stylesheet" type="text/css" href="${path}/css/public.css" />
                <link rel="stylesheet" type="text/css" href="${path}/css/customer.css" />


                <script type="text/javascript">
                    function submitForm(){
                        $("#pageNumber").val("1");
                        document.myForm.submit();
                    }
                </script>
                <div class="main">
                    <div class="content">
                        <div class="pageHead">
                            <table>
                                <tr>
                                    <th width="8">
                                        <img src="${path}/images/c_l.gif" height="31" width="8" />
                                    </th>
                                    <th align="left" class="title_area">
                                        当前位置：客户管理 &gt; 公告设置
                                    </th>
                                    <th width="9">
                                        <img src="${path}/images/c_r.gif" height="31" width="9">
                                    </th>
                                </tr>
                            </table>
                        </div>
                        <div class="pageBody">
                            <form id="search" name="myForm" action="${path}/system/announcement/search.action" method="post">
                                <input type="hidden" name="pager.pageNumber" value="1" id="pageNumber"/>
                                <a id="search_null" href="${path}/system/announcement/initAdd.action">&gt;&gt;新增公告</a>
                            </form>




                            <div class="gridDiv">
                                <table border="1" width="85%">
                                    <tr>
                                        <th>
                                            序号
                                        </th>
                                        <th style="width: 120px">
                                            创建日期
                                        </th>

                                        <th style="width: 120px">
                                            修改日期
                                        </th>

                                        <th>
                                            标题
                                        </th>
                                        <th >
                                            内容
                                        </th>
                                        <th style="width: 70px ">
                                            操作
                                        </th>
                                    </tr>

                                    <c:if test="${!empty pager.list}">
                                        <c:forEach items="${pager.list}" var="announce" varStatus="s">
                                            <tr>
                                                <td>${s.index+1}</td>
                                                <td><fmt:formatDate value="${announce.createDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate> </td>
                                                <td><fmt:formatDate value="${announce.modifyDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate></td>
                                                <td>${announce.title}</td>
                                                <td>${announce.context}</td>
                                                <td align="center">
                                                    <a href="${path}/system/announcement/initUpdate.action?ac.id=${announce.id}">修改</a>
                                                    <a href="${path}/system/announcement/delete.action?ac.id=${announce.id}">删除</a>
                                                </td>
                                            </tr>
                                        </c:forEach>
                                    </c:if>
                                    <c:if test="${empty pager.list}">
                                        <tr>暂时没有！</tr>
                                    </c:if>



                                </table>
                                <div  class="pager-container">



                                    <script type="text/javascript">
                                        function pager(num){
//        alert("num:"+num);
                                            document.getElementById("pageNumber").value = num;
                                            document.myForm.submit();
                                        }
                                    </script>

                                    <ul class="pager">
                                        <li class="pageInfo">共${pager.totalCount}条记录,<li class="pageInfo">共${pager.pageCount}页，当前为第${pager.pageNumber}页</li>
                                        <!--首页-->

                                        <c:if test="${pager.pageNumber==1}">
                                            <li class="firstPage currentPage">
                                        </c:if>
                                        <c:if test="${pager.pageNumber!=1}">
                                            <li class="firstPage">
                                        </c:if>
                                            <span><a  onclick="pager(1)">首页</a> </span>
                                        </li>

                                        <!--上一页-->

                                        <li class="prePage">
                                            <span>
                                                <c:if test="${pager.pageNumber>=1}">
                                                    <a onclick="pager(${pager.pageNumber-1})">上一页</a>
                                                </c:if>
                                                <c:if test="${pager.pageNumber<1}">
                                                    <a onclick="pager(${pager.pageNumber})">上一页</a>
                                                </c:if>

                                            </span>
                                        </li>

                                        <!--下一页-->


                                        <li class="nextPage">
                                            <span>
                                                <c:if test="${pager.pageNumber+1<=pager.pageCount}">
                                                    <a onclick="pager(${pager.pageNumber+1})">下一页</a>
                                                </c:if>
                                                <c:if test="${pager.pageNumber+1>pager.pageCount}">
                                                   <a onclick="pager(${pager.pageNumber})">下一页</a>
                                                </c:if>
                                            </span>
                                        </li>

                                        <!--末页-->

                                        <c:if test="${pager.pageNumber==pager.pageCount}">
                                            <li class="lastPage currentPage">
                                        </c:if>
                                        <c:if test="${pager.pageNumber!=pager.pageCount}">
                                            <li class="lastPage">
                                        </c:if>
                                            <span><a onclick="pager(${pager.pageCount})">末页</a> </span>
                                        </li>

                                    </ul>
                                </div>
                            </div>

                        </div>
        </td>
    </tr>
</table>

<!--尾部-->
<div class="footer">


    <div class="seperator"></div>
    <p>
        <a href="http://www.sztzedu.com">公司主站</a>|
        <a href="#">隐私策略</a>|
        <a href="#">服务条款</a>&nbsp;
        苏州天智教育公司&reg;版权所有 2012-2015
    </p>

</div>
</body>
</html>
